feat(knowledge): flush pipeline hardening — open-PR dedup, checkable evidence, harvest backstop - #46
Merged
Merged
Conversation
…heckable evidence, harvest backstop - INGEST_REPORT gains a required 4th section (## Open-PR check): the flush must diff candidates against open knowledge/* PR heads and verdict fold/drop/new, so sibling flushes stop piling up duplicate PRs (the #17-#40 and #42/#43 incidents tracked in #39) - Existing-layer evidence is now machine-checkable: a "Pages read: <ids>" line is required and each id is resolved against the checkout's wiki — fabricated page ids fail closed - Flush detection also fires on --title "knowledge:" (bypass window narrowed) - harvest.js: 10-row-per-session backstop cap (instruction stays 0-3) and removal of empty session files a flush leaves behind - auto-flush prompt aligned to the 4-section contract; --body-file literal path mandated (never --body) - tests: harvest.bats 12 cases, pre-flush-pr-gate.bats 19 cases; new behaviors red-first; full suite green; independent test-quality audit PASS Closes #39 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements every actionable item from #39, with the two real duplicate-PR pile-ups (#17–#40 consolidation, #42/#43 reconcile) as the driving evidence.
Contract changes (SKILL + gate + auto-flush prompt, aligned)
knowledge/*heads and diffs each candidate against them (verdict fold / drop / new); the INGEST_REPORT gains a required## Open-PR checksection the gate enforces.Pages read: <id>, …; the gate resolves every id against the checkout'swiki/and fails closed on fabricated ids (0 ids → deny; id not found → deny naming it; no wiki sibling → skip, global-install-safe).--title "knowledge:"now engages the gate on its own. (Full text-only closure impossible — residual documented in the gate comments.)Harvest
Tests
tests/harvest.bats(12) +tests/pre-flush-pr-gate.bats(19): every new behavior observed red on the unmodified code first; full suite green; independent test-quality audit VERDICT: PASS.Closes #39
🤖 Generated with Claude Code